package Questions;
import Levels.Chapter;
import Levels.ChapterId;
import Levels.Complexity;
import java.util.HashMap;

/**
 * Created by:
 * User: Igor Martynovich and Guzenko Igor
 * Date: 21.11.13
 */
public class QuestionsBook {
    HashMap<ChapterId, Chapter> chapters;


    public QuestionsBook(){
        int COUNT_OF_CHAPTERS = 2;
        this.chapters=new HashMap<>(COUNT_OF_CHAPTERS);
        this.chapters.put(ChapterId.CHAPTER_ONE,new Chapter());
        this.chapters.put(ChapterId.CHAPTER_TWO,new Chapter());
    }

    public void addQuestionToChapter(ChapterId chapterId, Complexity complexity, Question question){
        chapters.get(chapterId).addQuestion(complexity,question);
    }

    public Chapter getChapterById(ChapterId id){
        return chapters.get(id);
    }
}
